package com.koron.tool.service;

import com.koron.bean.base.Response;
import com.koron.bean.system.staff.vo.EamUser;
import com.koron.bean.workflow.RedirectQuery;
import com.koron.tool.bean.ScrapListBean;
import com.koron.tool.bean.ScrapQuery;
import com.koron.tool.bean.ToolQuery;
import org.koron.ebs.mybatis.SessionFactory;
import org.springframework.web.multipart.MultipartFile;

import java.io.OutputStream;


public interface ToolScrapDataService {

    /**
     * 预报废工具单查询
     * @param factory
     * @param query
     * @return
     */
    Response getYuScrapList(SessionFactory factory, ToolQuery query);

    /**
     * 移除预报废工具中手动报废的工具
     * @param factory
     * @param id
     * @return
     */
    Response deleteYuScrap(SessionFactory factory,String id);


    /**
     * 查看报废单列表
     * @param factory
     * @return
     */
    Response getScrapList(SessionFactory factory,ScrapQuery query);

    /**
     * 生成报废单
     * @param factory
     * @param query
     * @return
     */
    Response addScrapList(SessionFactory factory,EamUser user,ScrapListBean query, Integer operation);

    /**
     * 草稿状态修改报废单
     * @param factory
     * @param user
     * @param bean
     * @param operation
     * @return
     */
    Response updateScrapList(SessionFactory factory, EamUser user, ScrapListBean bean, Integer operation);


    /**
     * 流程审批回调
     * @param factory
     * @param redirectQuery
     * @return
     */
    Response updateStateScrap(SessionFactory factory, RedirectQuery redirectQuery);

    /**
     * 查看报废单详情
     * @param factory
     * @param id
     * @return
     */
    Response scrapInfo(SessionFactory factory,String id);

    /**
     *
     * @param factory
     * @param file
     * @return
     */
    Response upload(SessionFactory factory,EamUser user, MultipartFile file,String toolTypeId);

    Response uploadTest(SessionFactory factory,EamUser user, MultipartFile file,String toolTypeId);


    /**
     * 导出PDF
     *
     * @param id
     * @return
     */
    void exportPdf(SessionFactory factory, EamUser user, String id, OutputStream os);

}
